<?php	
include("mysql_connect.php");

if( isset( $_POST['Reset']) )
{
// Clear Spot
$strSqlCommand = "TRUNCATE spot_group_users";
mysql_query($strSqlCommand);
$strSqlCommand = "TRUNCATE spot_sb_group";
mysql_query($strSqlCommand);
$strSqlCommand = "TRUNCATE spot_user_feed";
mysql_query($strSqlCommand);
$strSqlCommand = "TRUNCATE spot_user_sb_m";
mysql_query($strSqlCommand);
$strSqlCommand = "TRUNCATE budget";
mysql_query($strSqlCommand);

// Clear Media
$strSqlCommand = "TRUNCATE text";
mysql_query($strSqlCommand);
$strSqlCommand = "TRUNCATE image";
mysql_query($strSqlCommand);
$strSqlCommand = "TRUNCATE video";
mysql_query($strSqlCommand);
$strSqlCommand = "TRUNCATE media";
mysql_query($strSqlCommand);

// Clear Account
$strSqlCommand = "TRUNCATE sharegroup";
mysql_query($strSqlCommand);
$strSqlCommand = "TRUNCATE storyboard";
mysql_query($strSqlCommand);
$strSqlCommand = "TRUNCATE user";
mysql_query($strSqlCommand);

// init global_config
$strSqlCommand = "TRUNCATE user";
mysql_query($strSqlCommand);
$strSqlCommand = 'INSERT INTO `global_config`(`ServerPath`, `MediaDownloadPath`) 
VALUES ("http://107.22.182.14/","http://107.22.182.14/media_storage/")';
mysql_query($strSqlCommand);
}

else
{
		echo '
	<form id="LoginForm" action="" method="post">
		Are you sure to reset database??<br/>
		If not sure, please close this window.<br/>
		<input type="hidden" name="Reset" value="Reset"/></div><br/>
		<input type="submit" value="Reset" id="BtReset"/>
	</form>';
}
?>